#pragma once
#include"Commond.h"


class CentralCache
{
public:
	static inline CentralCache* GetInstance()
	{
		return &_sInst;
	}
	size_t FetchRangeObj(void*& start, void*& end, size_t batchNum, size_t index);

	Span* GetOneSpan(SpanList& it,size_t size);
	void ReleaseListToSpan(void*& start,size_t size);
private:
	SpanList SpanLists[NFREE_LIST];
	CentralCache()
	{}
	CentralCache(const CentralCache& ch) = delete;
	static CentralCache _sInst;
};